Public Class ColorSelect

    Dim _type As Integer

    Public Property Type() As Integer
        Get
            Return _type
        End Get
        Set(ByVal value As Integer)
            _type = value
        End Set
    End Property

    Private Sub btn_Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Cancel.Click
        _type = -1
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
    End Sub

    Private Sub btnBlack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBlack.Click
        _type = 0
        Me.DialogResult = Windows.Forms.DialogResult.OK
    End Sub

    Private Sub btnWhite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWhite.Click
        _type = 1
        Me.DialogResult = Windows.Forms.DialogResult.OK
    End Sub

    Private Sub ColorSelect_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.CenterToParent()
    End Sub
End Class